package com.jnevision.leaveapprovalrecords.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.baomidou.mybatisplus.extension.api.ApiController;
import com.baomidou.mybatisplus.extension.api.R;
import com.jnevision.leaveapprovalrecords.model.LeaveApprovalRecords;
import com.jnevision.leaveapprovalrecords.service.LeaveApprovalRecordsServiceImpl;

/**
 * <p>
 * 请假审批记录 前端控制器
 * </p>
 *
 * @author gavin
 * @since 2019-07-13
 */

@RestController
@RequestMapping("/leaveapprovalrecordss")
public class LeaveApprovalRecordsController extends ApiController {
    @Autowired
    private LeaveApprovalRecordsServiceImpl approvalRecordsServiceImpl;

    /**
     * 请假审批
     * 
     * @param lar
     */
    @PutMapping
    public R<Boolean> update(@RequestBody LeaveApprovalRecords lar) {
        return this.success(this.approvalRecordsServiceImpl.updateById(lar));
    }
}
